home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / CIncludes / CMMComponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  5.5 KB  |  150 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMMComponent.h
  3.  
  4.      Contains:    ColorSync CMM Components
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CMMCOMPONENT__
  21. #define __CMMCOMPONENT__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33. /*    #include <QuickdrawText.h>                                    */
  34.  
  35. #ifndef __COMPONENTS__
  36. #include <Components.h>
  37. #endif
  38.  
  39. #ifndef __CMAPPLICATION__
  40. #include <CMApplication.h>
  41. #endif
  42. /*    #include <Files.h>                                            */
  43. /*        #include <OSUtils.h>                                    */
  44. /*            #include <Memory.h>                                    */
  45. /*    #include <Printing.h>                                        */
  46. /*        #include <Errors.h>                                        */
  47. /*        #include <Dialogs.h>                                    */
  48. /*            #include <Windows.h>                                */
  49. /*                #include <Events.h>                                */
  50. /*                #include <Controls.h>                            */
  51. /*                    #include <Menus.h>                            */
  52. /*            #include <TextEdit.h>                                */
  53. /*    #include <CMICCProfile.h>                                    */
  54.  
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58.  
  59. #if PRAGMA_ALIGN_SUPPORTED
  60. #pragma options align=mac68k
  61. #endif
  62.  
  63. #if PRAGMA_IMPORT_SUPPORTED
  64. #pragma import on
  65. #endif
  66.  
  67.  
  68. enum {
  69.     CMMInterfaceVersion            = 1
  70. };
  71.  
  72. /* Component function selectors */
  73. /* Required */
  74. enum {
  75.     kCMMInit                    = 0,
  76.     kNCMMInit                    = 6,
  77.     kCMMMatchColors                = 1,
  78.     kCMMCheckColors                = 2
  79. };
  80.  
  81. /* Optional */
  82. enum {
  83.     kCMMValidateProfile            = 8,
  84.     kCMMFlattenProfile            = 14,
  85.     kCMMUnflattenProfile        = 15,
  86.     kCMMMatchBitmap                = 9,
  87.     kCMMCheckBitmap                = 10,
  88.     kCMMMatchPixMap                = 3,
  89.     kCMMCheckPixMap                = 4,
  90.     kCMMConcatenateProfiles        = 5,
  91.     kCMMConcatInit                = 7,
  92.     kCMMNewLinkProfile            = 16,
  93.     kCMMGetPS2ColorSpace        = 11,
  94.     kCMMGetPS2ColorRenderingIntent = 12,
  95.     kCMMGetPS2ColorRendering    = 13,
  96.     kCMMGetPS2ColorRenderingVMSize = 17
  97. };
  98.  
  99. extern pascal CMError NCMInit(ComponentInstance CMSession, CMProfileRef srcProfile, CMProfileRef dstProfile)
  100.  FIVEWORDINLINE(0x2F3C, 8, 6, 0x7000, 0xA82A);
  101. extern pascal CMError CMInit(ComponentInstance CMSession, CMProfileHandle srcProfile, CMProfileHandle dstProfile)
  102.  FIVEWORDINLINE(0x2F3C, 8, 0, 0x7000, 0xA82A);
  103. extern pascal CMError CMMatchColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count)
  104.  FIVEWORDINLINE(0x2F3C, 8, 1, 0x7000, 0xA82A);
  105. extern pascal CMError CMCheckColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count, long *result)
  106.  FIVEWORDINLINE(0x2F3C, 12, 2, 0x7000, 0xA82A);
  107. /* Optional functions */
  108. extern pascal CMError CMMValidateProfile(ComponentInstance CMSession, CMProfileRef prof, Boolean *valid)
  109.  FIVEWORDINLINE(0x2F3C, 8, 8, 0x7000, 0xA82A);
  110. extern pascal CMError CMMFlattenProfile(ComponentInstance CMSession, CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon)
  111.  FIVEWORDINLINE(0x2F3C, 16, 14, 0x7000, 0xA82A);
  112. extern pascal CMError CMMUnflattenProfile(ComponentInstance CMSession, FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon)
  113.  FIVEWORDINLINE(0x2F3C, 12, 15, 0x7000, 0xA82A);
  114. extern pascal CMError CMMatchBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  115.  FIVEWORDINLINE(0x2F3C, 16, 9, 0x7000, 0xA82A);
  116. extern pascal CMError CMCheckBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  117.  FIVEWORDINLINE(0x2F3C, 16, 10, 0x7000, 0xA82A);
  118. extern pascal CMError CMMatchPixMap(ComponentInstance CMSession, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  119.  FIVEWORDINLINE(0x2F3C, 12, 3, 0x7000, 0xA82A);
  120. extern pascal CMError CMCheckPixMap(ComponentInstance CMSession, const PixMap *myPixMap, CMBitmapCallBackUPP progressProc, BitMap *myBitMap, void *refCon)
  121.  FIVEWORDINLINE(0x2F3C, 16, 4, 0x7000, 0xA82A);
  122. extern pascal CMError CMConcatInit(ComponentInstance CMSession, CMConcatProfileSet *profileSet)
  123.  FIVEWORDINLINE(0x2F3C, 4, 7, 0x7000, 0xA82A);
  124. extern pascal CMError CMNewLinkProfile(ComponentInstance CMSession, CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  125.  FIVEWORDINLINE(0x2F3C, 12, 16, 0x7000, 0xA82A);
  126. extern pascal CMError CMMGetPS2ColorSpace(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  127.  FIVEWORDINLINE(0x2F3C, 16, 11, 0x7000, 0xA82A);
  128. extern pascal CMError CMMGetPS2ColorRenderingIntent(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  129.  FIVEWORDINLINE(0x2F3C, 16, 12, 0x7000, 0xA82A);
  130. extern pascal CMError CMMGetPS2ColorRendering(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  131.  FIVEWORDINLINE(0x2F3C, 20, 13, 0x7000, 0xA82A);
  132. extern pascal CMError CMMGetPS2ColorRenderingVMSize(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize)
  133.  FIVEWORDINLINE(0x2F3C, 12, 17, 0x7000, 0xA82A);
  134. extern pascal CMError CMConcatenateProfiles(ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  135.  FIVEWORDINLINE(0x2F3C, 12, 5, 0x7000, 0xA82A);
  136.  
  137. #if PRAGMA_IMPORT_SUPPORTED
  138. #pragma import off
  139. #endif
  140.  
  141. #if PRAGMA_ALIGN_SUPPORTED
  142. #pragma options align=reset
  143. #endif
  144.  
  145. #ifdef __cplusplus
  146. }
  147. #endif
  148.  
  149. #endif /* __CMMCOMPONENT__ */
  150.